def jump_search(array, n):
    length=len(array)
    step=int(length**0.5)
    left=0
    while array[min(step,length)-1] < n:
        left=step
        step+=int(length**0.5)
        if left >= length:
            return -1
    while array[left] < n:
        left+=1
        if left == min(step,length):
            return -1
    if array[left] == n:
        return left
    else:
        return -1
